.class public Lrexsee/dialog/RexseeChronometer;
.super Ljava/lang/Object;
.source "RexseeChronometer.java"

# interfaces
.implements Lrexsee/core/browser/clazz/JavascriptInterface;


# static fields
.field private static final INTERFACE_NAME:Ljava/lang/String; = "Chronometer"


# instance fields
.field private final mBrowser:Lrexsee/core/browser/Browser;

.field private mClock:Lrexsee/dialog/ChronometerDialog;

.field private final mContext:Landroid/content/Context;


# direct methods
.method public constructor <init>(Lrexsee/core/browser/Browser;)V
    .locals 1
    .param p1, "browser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 29
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 26
    const/4 v0, 0x0

    iput-object v0, p0, Lrexsee/dialog/RexseeChronometer;->mClock:Lrexsee/dialog/ChronometerDialog;

    .line 30
    iput-object p1, p0, Lrexsee/dialog/RexseeChronometer;->mBrowser:Lrexsee/core/browser/Browser;

    .line 31
    invoke-virtual {p1}, Lrexsee/core/browser/Browser;->getContext()Landroid/content/Context;

    move-result-object v0

    iput-object v0, p0, Lrexsee/dialog/RexseeChronometer;->mContext:Landroid/content/Context;

    .line 32
    return-void
.end method

.method static synthetic access$0(Lrexsee/dialog/RexseeChronometer;)Lrexsee/core/browser/Browser;
    .locals 1

    .prologue
    .line 25
    iget-object v0, p0, Lrexsee/dialog/RexseeChronometer;->mBrowser:Lrexsee/core/browser/Browser;

    return-object v0
.end method

.method static synthetic access$1(Lrexsee/dialog/RexseeChronometer;Lrexsee/dialog/ChronometerDialog;)V
    .locals 0

    .prologue
    .line 26
    iput-object p1, p0, Lrexsee/dialog/RexseeChronometer;->mClock:Lrexsee/dialog/ChronometerDialog;

    return-void
.end method

.method static synthetic access$2(Lrexsee/dialog/RexseeChronometer;)Lrexsee/dialog/ChronometerDialog;
    .locals 1

    .prologue
    .line 26
    iget-object v0, p0, Lrexsee/dialog/RexseeChronometer;->mClock:Lrexsee/dialog/ChronometerDialog;

    return-object v0
.end method


# virtual methods
.method public dismiss()V
    .locals 2

    .prologue
    .line 54
    iget-object v0, p0, Lrexsee/dialog/RexseeChronometer;->mContext:Landroid/content/Context;

    check-cast v0, Landroid/app/Activity;

    new-instance v1, Lrexsee/dialog/RexseeChronometer$2;

    invoke-direct {v1, p0}, Lrexsee/dialog/RexseeChronometer$2;-><init>(Lrexsee/dialog/RexseeChronometer;)V

    invoke-virtual {v0, v1}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V

    .line 61
    return-void
.end method

.method public getInheritInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 0
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 17
    return-object p0
.end method

.method public getInterfaceName()Ljava/lang/String;
    .locals 2

    .prologue
    .line 13
    new-instance v0, Ljava/lang/StringBuilder;

    iget-object v1, p0, Lrexsee/dialog/RexseeChronometer;->mBrowser:Lrexsee/core/browser/Browser;

    iget-object v1, v1, Lrexsee/core/browser/Browser;->application:Lrexsee/core/application/RexseeApplication;

    iget-object v1, v1, Lrexsee/core/application/RexseeApplication;->resources:Lrexsee/core/application/Resource;

    iget-object v1, v1, Lrexsee/core/application/Resource;->prefix:Ljava/lang/String;

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v1, "Chronometer"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public getNewInterface(Lrexsee/core/browser/Browser;)Lrexsee/core/browser/clazz/JavascriptInterface;
    .locals 1
    .param p1, "childBrowser"    # Lrexsee/core/browser/Browser;

    .prologue
    .line 21
    new-instance v0, Lrexsee/dialog/RexseeChronometer;

    invoke-direct {v0, p1}, Lrexsee/dialog/RexseeChronometer;-><init>(Lrexsee/core/browser/Browser;)V

    return-object v0
.end method

.method public getStyle(Ljava/lang/String;)Ljava/lang/String;
    .locals 1
    .param p1, "name"    # Ljava/lang/String;

    .prologue
    .line 67
    iget-object v0, p0, Lrexsee/dialog/RexseeChronometer;->mClock:Lrexsee/dialog/ChronometerDialog;

    if-nez v0, :cond_0

    const-string v0, ""

    :goto_0
    return-object v0

    :cond_0
    iget-object v0, p0, Lrexsee/dialog/RexseeChronometer;->mClock:Lrexsee/dialog/ChronometerDialog;

    invoke-virtual {v0, p1}, Lrexsee/dialog/ChronometerDialog;->getStyle(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    goto :goto_0
.end method

.method public setStyle(Ljava/lang/String;)V
    .locals 1
    .param p1, "style"    # Ljava/lang/String;

    .prologue
    .line 63
    iget-object v0, p0, Lrexsee/dialog/RexseeChronometer;->mClock:Lrexsee/dialog/ChronometerDialog;

    if-nez v0, :cond_0

    .line 65
    :goto_0
    return-void

    .line 64
    :cond_0
    iget-object v0, p0, Lrexsee/dialog/RexseeChronometer;->mClock:Lrexsee/dialog/ChronometerDialog;

    invoke-virtual {v0, p1}, Lrexsee/dialog/ChronometerDialog;->setStyle(Ljava/lang/String;)V

    goto :goto_0
.end method

.method public show(Ljava/lang/String;ILjava/lang/String;)V
    .locals 8
    .param p1, "style"    # Ljava/lang/String;
    .param p2, "timeout"    # I
    .param p3, "timeoutCallback"    # Ljava/lang/String;

    .prologue
    const/4 v4, 0x1

    .line 36
    const-string v7, "#ff0000"

    move-object v0, p0

    move-object v1, p1

    move v2, p2

    move-object v3, p3

    move v5, v4

    move v6, v4

    invoke-virtual/range {v0 .. v7}, Lrexsee/dialog/RexseeChronometer;->show(Ljava/lang/String;ILjava/lang/String;ZZZLjava/lang/String;)V

    .line 37
    return-void
.end method

.method public show(Ljava/lang/String;ILjava/lang/String;ZZZLjava/lang/String;)V
    .locals 11
    .param p1, "style"    # Ljava/lang/String;
    .param p2, "timeout"    # I
    .param p3, "timeoutCallback"    # Ljava/lang/String;
    .param p4, "showTotal"    # Z
    .param p5, "showElapse"    # Z
    .param p6, "showRest"    # Z
    .param p7, "highlightColor"    # Ljava/lang/String;

    .prologue
    .line 39
    invoke-virtual {p0}, Lrexsee/dialog/RexseeChronometer;->dismiss()V

    .line 40
    iget-object v1, p0, Lrexsee/dialog/RexseeChronometer;->mContext:Landroid/content/Context;

    move-object v0, v1

    check-cast v0, Landroid/app/Activity;

    move-object v10, v0

    new-instance v1, Lrexsee/dialog/RexseeChronometer$1;

    move-object v2, p0

    move-object v3, p1

    move v4, p2

    move-object v5, p3

    move v6, p4

    move/from16 v7, p5

    move/from16 v8, p6

    move-object/from16 v9, p7

    invoke-direct/range {v1 .. v9}, Lrexsee/dialog/RexseeChronometer$1;-><init>(Lrexsee/dialog/RexseeChronometer;Ljava/lang/String;ILjava/lang/String;ZZZLjava/lang/String;)V

    invoke-virtual {v10, v1}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V

    .line 52
    return-void
.end method
